<template>
  <div class="member-list">
    <!--    订单管理-充值订单-->
    <BasicTable @register="registerTable" />
  </div>
</template>

<script setup lang="ts">
  import { onActivated } from 'vue';
  import mcApi from 'mc-c2b2m-operator-api';
  import { tableColumns, tableFormSchema } from './data';
  import { BasicTable, useTable } from '@/components/Table';
  import { useTableAction } from '@/hooks/web/useTableAction';

  const { OrderModule } = mcApi;
  const { SalesOrderApi } = OrderModule;
  const { handleFetchDateParams } = useTableAction();

  const [registerTable, { reload }] = useTable({
    striped: false,
    bordered: false,
    canResize: false,
    immediate: false,
    useSearchForm: true,
    columns: tableColumns,
    showIndexColumn: false,
    showTableSetting: false,
    api: SalesOrderApi.getRechargeSalesOrderPage,
    beforeFetch: (arg) => {
      handleFetchDateParams(arg);
      arg.desc = 'cso.paid_time';
    },
    formConfig: {
      labelWidth: 120,
      schemas: tableFormSchema,
    },
  });
  onActivated(() => reload());
</script>
<script lang="ts">
  export default {
    name: 'RechargeSalesOrder',
  };
</script>

<style scoped lang="scss">
  :deep(.ant-table-thead > tr > th) {
    background: #fff;
  }
</style>
